This invention relates to a timer controller for use in a virtual machine system.
It is known in the art that a virtual machine system comprises a real central processing unit (real CPU) and is operable in one of a plurality of modes. The modes comprise a non-virtual machine (NVM) mode, a virtual machine monitoring (VMM) mode, and a virtual machine operating system (VMOS) mode.
In the manner which will later be described more in detail, an operating system (OS) is run on the real central processing unit. When run on the real central processing unit, the operating system is named a host operating system in the art. In compliance with the host operating system, the non-virtual machine mode runs ordinary jobs, one for each user. In place of the ordinary jobs, the virtual machine monitoring mode runs a virtual machine control program (VMCP) in compliance with the host operating system as a specific job of the host operating system. When run, the virtual machine control program forms and controls a plurality of guest operating systems. In compliance with each guest operating system, the virtual machine operating system mode runs others of the ordinary jobs. It is therefore possible to understand that the virtual machine operating system mode runs the guest operating systems.
According to U.S. patent application Ser. No. 908,269 filed Sept. 17, 1986, by the present applicant based on Japanese Patent Application No. 205,533 of 1985, a mode register is used in such a virtual machine system. The mode register may comprise two one-bit memories and indicate one of the non-virtual machine mode, the virtual machine monitoring mode, and the virtual machine operating system mode in which the virtual machine system is operating for each user.
It will also be described more in detail later in the following that interruption is received by the real central processing unit for dispatch of the jobs run in the non-virtual machine mode and of the virtual machine control program which is run in the virtual machine monitoring mode. The host operating system is informed of occurrence of the interruption. The interruption may therefore be called a host operating system interruption.
Similarly, interruption is received for the guest operating systems and for the jobs which are run in the virtual machine operating system mode. Through the virtual machine control program, the host operating system is informed of occurrence of the interruption for dispatch of the guest operating systems. This interruption will be named a primary virtual machine operating system interruption. On the other hand, the guest operating system is informed of occurrence of the interruption for dispatch of the jobs run in the virtual machine operating system mode and judges whether or not the guest operating system can deal with the interruption. Only when the guest operating system can not deal with the interruption, guest operiting system reports the occurrence of interruption to the host operating system through the virtual machine control program. This latter interruption will be termed a secondary virtual machine operating system interruption.
In a conventional virtual machine system, a timer register or timer is used on dealing with the host operating system interruption. A different timer register is used on dealing with both the primary and the secondary virtual machine operating system interruptions. Control of the different timer register is therefore complicated as will later become clear. This results in an increased overhead.